/**
 * 
 */
package cn.ad.server.domain.ad;

/**
 * 数据库持久化对象抽象类
 * @author Wu Chengjun
 *
 */
public abstract class PO {
	
	/**
	 * 数据库中的标识
	 */
	protected long id;
	
	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PO other = (PO) obj;
		if (id != other.id)
			return false;
		return true;
	}
}
